import axios,{InternalAxiosRequestConfig,AxiosResponse,AxiosError} from 'axios'
axios.defaults.baseURL="http://www.zhaijizhe.cn:3001/"
axios.interceptors.request.use((config:InternalAxiosRequestConfig)=>{
    return config
})
axios.interceptors.response.use((response:AxiosResponse)=>{
    return response
},(err:AxiosError)=>{
    if(err.response?.status){
        switch(err.response.status){
            case 500:
                break
            case 404:
                break
        }
        return Promise.reject(err)
    }
})
export default axios